package com.guanyu.u2cache.caffeine;

import com.guanyu.u2cache.annotation.useble.CaffeineSignal;
import com.guanyu.u2cache.cache.Level1Cache;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;

/**
 * @author zhouyunjian
 * @date 2023/12/07 16:57
 **/
//@ConditionalOnBean(CaffeineSignal.class)
public class CaffeineConfiguration {

//    @ConditionalOnMissingBean(RedisSignal.class)
//    @Bean
//    CacheOperate localCacheOperate() {
//        return new CacheOperate(new Level1CacheImpl(), null, null);
//    }

    // @ConditionalOnBean(RedisSignal.class)
    @Bean
    Level1Cache level1Cache() {
        return new Level1CacheImpl();
    }
}
